import request from '/@/utils/request';


export const treeList = (params?: Object) => {
	return request({
		url: '/admin/scadaSystem/tree',
		method: 'get',
		params,
	});
};

//新增
export const add = (data: Object) => {
	return request({
        url: '/admin/scadaSystem',
        method: 'post',
        data
	})
}
//修改
export const edit = (data: Object) => {
	return request({
        url: '/admin/scadaSystem',
        method: 'put',
        data
	})
}
//详情
export const configDetail = (id: number) => {
	return request({
        url: '/admin/scadaSystem/' + id, 
        method: 'get',
	})
}
//删除
export const del = (data: Object) => {
	return request({
        url: '/admin/scadaSystem',
        method: 'delete',
        data
	})
}
//组态绑定系统参数
export const bindConfig = (data: Object) => {
	return request({
		url: '/admin/scadaSystemBind/bind',
		method: 'post',
		data
	})
}	
//组态绑定系统参数回显
export const bindConfigDetail = (params?: Object) => {
	return request({
		url: '/admin/scadaSystemBind/getUnitNos',
		method: 'get',
		params
	})
}